/*
* @Author: majingyu
* @Date:   2017-06-17 15:56:59
* @Last Modified by:   jingyu.ma
* @Last Modified time: 2017-07-23 20:42:44
*/
 
import { setCookie } from 'common/storage.js';

export const local = () => {
    return geolocation();
}
function geolocation(){
    if (navigator.geolocation){
        let lat = '',
            lng = '';
        navigator.geolocation.getCurrentPosition(function (position) { 
            lng = position.coords.longitude || '39.75';  
            lat = position.coords.latitude || '116';
        });
        let local = {
           lat: lat || '39.75',
           lng: lng || '116'
        }
        return local;
    }else{
       alert('浏览器暂时不支持获取') 
    }
}


